module Odesolver_module
contains
        real function phyEulerStepMethod(starty, startx, stopx, step)
            implicit none
            real, intent(in)    :: starty, startx, stopx, step
            real    :: t, x0, y0, y1
            integer :: length
            integer :: i
            length = (stopx - startx)/step
            x0 = startx
            y0 = starty
            i = 1
            do t = startx + step, stopx, step
                y1 = f(x0, y0)*step + y0
                i = i + 1
                print*, x0, y0
                y0 = y1
                x0 = t
            end do
        end function phyEulerStepMethod

        
        
        real function f(x, y)
            real, intent(in) :: x, y
            f = x*y
        end function f     

end module Odesolver_module

program main
    use Odesolver_module
    implicit none
    real, allocatable, dimension(:,:) :: data
    data = phyEulerStepMethod(1.0, 0.0, 2.0, 0.01);
end program